// src/composables/useWatchText.ts
import { watch,nextTick } from "vue";
export function useFocusFn(props,ref) {
	watch(
		() => props.status,
		(data) => {
			if (data === "edit" && props.initFocus) {
                nextTick(()=>{
                    ref.value?.focus()
                })
                
			}
		},{ immediate: true }
	);
}
